package cinema.v1_1.util;

import java.io.*;
import java.nio.file.*;

public class FileUtil {
    public static void write(String path, String content) throws IOException {
        Files.write(Paths.get(path), content.getBytes(),
                StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
    }

    public static String read(String path) throws IOException {
        return new String(Files.readAllBytes(Paths.get(path)));
    }
}